<template>
	<view>
		<navigator url="/pages/center/passwork" hover-class="none">
			<view class="kalist">
				<view class="span">账号密码修改</view>
				<view class="em"></view>
			</view>
		</navigator>
		<view class="h"></view>
		<navigator url="/pages/center/card" hover-class="none">
			<view class="kalist">
				<view class="span">借记卡</view>
				<view class="em"></view>
			</view>
		</navigator>
		<view class="wp">
			<view class="btn" @click="Out()">退出登录</view>
		</view>

	</view>


</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onLoad() {
			let that = this;

		},
		methods: {
			Out: function() {
				let that = this;

				uni.showModal({
					title: '提示',
					content: '确定要退出登录',
					success: function(res) {
						if (res.confirm) {							
							that.common.http('POST', 'user/unbind', '', function(res) {
								uni.hideLoading();
								console.log(res);
								uni.showToast({
									icon: 'none',
									title: '退出成功',
									duration: 2000
								});
								uni.removeStorage({
									key: 'byh5token',
									success: function(res) {
										console.log('success');
									}
								});
								uni.removeStorage({
									key: 'byh5type',
									success: function(res) {
										console.log('success');
									}
								});
								setTimeout(function() {
									uni.reLaunch({
										url: '/pages/login/login',
									})
								}, 1500);
							});						
						} else if (res.cancel) {}
					}
				});
			},
		}
	}
</script>

<style scoped>
	.kalist {
		height: 100rpx;
		align-items: center;
		line-height: 1;
		display: flex;
		justify-content: space-between;
		padding: 0 30rpx;
		background-image: url('@/static/images/app_i3.png');
		background-repeat: no-repeat;
		background-size: 20rpx auto;
		background-position: 96% center;
		background-color: #fff;
	}

	.kalist .span {
		font-size: 32rpx;
		color: #000;
	}

	.kalist .em {
		font-size: 28rpx;
		color: #444;
	}

	.btn {
		display: flex;
		justify-content: center;
		align-items: center;
		background-color: #eb0000;
		font-size: 28rpx;
		color: #fff;
		border-radius: 50px;
		height: 84rpx;
		margin-top: 86rpx;
	}
</style>